﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using Core.BusinessLogic.Interfaces;
using Core.DataAccess.IRepositories;
using Core.DataAccess;
using Core.Common;

namespace Core.BusinessLogic
{
    [Export(typeof(IStatusChatService))]
    public class StatusChatService : IStatusChatService
    {
        [Import]
        private IStatusChatRepository _statusChatRepository;

        public StatusChatService()
        {
            MEFManager.Compose(this);
        }

        public void SaveStatus(DataAccess.Status status)
        {
            _statusChatRepository.SaveStatus(status);
        }

        public void UpdateStatusChat(int accountID, bool status)
        {
            _statusChatRepository.UpdateStatusChat(accountID, status);
        }

        public Status GetStatusByAccountID(int accountID)
        {
            return _statusChatRepository.GetStatusByAccountID(accountID);
        }
    }
}
